package com.xx.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("user")
@ResponseBody
public class UserController {
    @GetMapping("showParams")
    public String showParams(@RequestParam("name") String name, int age){
        System.out.println("name:"+name);
        System.out.println("age:"+age);
        return "接收GET请求参数";
    }
}
